package com.example.xw.common.service;

import com.example.xw.common.entity.Admin;
import com.example.xw.common.vo.Result;
import org.springframework.cloud.openfeign.FeignClient;
import com.example.xw.common.service.fallback.FallbackAdminServiceImpl;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "xw-admin",contextId="myAdminServiceImpl",fallback = FallbackAdminServiceImpl.class)
public interface AdminService {
    @PostMapping("/admin/register")
    public Result<Admin> register(@RequestBody Admin admin);

    @PostMapping("/admin/login")
    public Result<Admin> login(@RequestParam("loginName") String loginName, @RequestParam("loginPwd") String loginPwd);
}
